home *** CD-ROM | disk | FTP | other *** search
- --
- -- Application
- --
-
- -- constants:
-
-
- property ancestor
- property stepNum
-
- global gPrinterB,gBannerartB,gLeftB,gSpeakerB,gHomeB,gHelpB,gRightB
-
- on new me
- set ancestor = new (script "NavStructSetUp")
- initSoundList ()
- setup (me)
- set stepNum = 1
- -- add (the actorList, new (script "ObjectUpdater", me))
- return me
- end
-
-
- on destruct me
- if objectP (ancestor) then destruct (ancestor)
- set ancestor = 0
- end
-
-
- -- mouseDown on a specific navigation button.
-
- on mousedown me, spr
- set mem = the memberNum of sprite spr
- set cLib = the castLibNum of sprite spr
- if mem then set name = item 1 of the name of member mem of castLib cLib
- else set name = 0
-
- case (name) of
- "printer": -- sprite 41:
- if basicNameAnim (me, name, spr, 6) then printActivitySpace (me)
- "bannerart","topbanner","speaker": --42,43,44:
- playBanner (me) -- replay the banner
- "left": --45:
- if not basicNameAnim (me, name, spr, 6) then return 1
-
- if the frame < label("finish") then
- --open the dialog window
- openDialogWin(me, "activityPrev")
- end if
- "help": --46:
- if not basicNameAnim (me, name, spr, 6) then return 1
-
- -- global gType
- --
- -- case (gType) of
- -- #DirectionArrows:
- -- set theFile = "HELPDA"
- -- #ClickIdentify:
- -- set theFile = "HELPCI"
- -- #DragDropStick:
- -- set theFile = "HELPDD"
- -- #DragDropHide:
- -- set theFile = "HELPDD"
- -- #DragDropColor:
- -- set theFile = "HELPDD"
- -- #SinglePoint:
- -- set theFIle = "HELPDD"
- -- #SinglePointStick:
- -- set theFile = "HELPDD"
- -- #SinglePointStickB:
- -- set theFile = "HELPDD"
- -- #SinglePointColor:
- -- set theFile = "HELPDD"
- -- #MatchGame:
- -- set theFile = "HELPMG"
- -- #StdPaint:
- -- set theFile = "HELPPNT"
- -- otherwise
- -- set theFile = "HELPMM"
- -- end case
- --
- -- initHelpWin (me, 0, theFile)
- "home": -- 47:
- if not basicNameAnim (me, name, spr, 6) then return 1
-
- if the movieName contains "main" then
- openDialogWin (me, "quit")
- else if isLastActivity (me) and the frame >= label("finish") then
- goMain (me)
- else
- openDialogWin (me, "lesson")
- -- goMain (me) -- main menu
- end if
- "bye":
- if not basicNameAnim (me, name, spr, 6) then return 1
-
- if the movieName contains "main" then
- openDialogWin (me, "quit")
- end if
-
- "right": --48:
- if not basicNameAnim (me, name, spr, 6) then return 1
-
- if the frame < label("finish") then
- --open the dialog window
- openDialogWin(me, "activityNext")
- else
- next (me) -- next activity
- end if
-
- otherwise return 0
- end case
- return 1
- end
-
-
- on quit me
- spritesOff
- killActorList (me)
- go to Frame "quit"
- end
-
-
-
- on stepFrame me
- stepFrame (ancestor)
- --if stepNum mod 20 = 0 then
- checkGUICursors (me)
- --set stepNum = 1
- --end if
- --set stepNum = stepNum + 1
- set num = the scriptNum of sprite gHelpB
- if num then
- if not (the name of cast num contains "doAction") then
- set the timeOutLapsed = 0
- end if
- else
- set the timeOutLapsed = 0
- end if
- end
-
-
-
- on checkGUICursors me
- set newlst = []
- set oldlst = []
- set cycleList = [gPrinterB,gBannerartB,gLeftB,gSpeakerB,gHomeB,gHelpB,gRightB]
-
- repeat with i in cycleList
- set num = the scriptNum of sprite i
- if not num then
- if i = gHomeB then set the timeOutLapsed = 0
- add (oldlst, i)
- else add (newlst, i)
- end repeat
-
- clearHandCursor (oldlst)
- initHandCursor ("pointer", newlst)
- end
-
-
- on timeOut me
- timeOut (ancestor)
- set num = the scriptNum of sprite gHomeB
- set num2 = the scriptNum of sprite gHelpB
- if not num or not num2 then
- set the timeoutLapsed = 0
- else if the timeoutLapsed >= (60 * 60) and the name of cast num contains "doAction" then
- goMain (me)
- else
- if the name of cast num2 contains "doAction" then mouseDown (me, gHelpB)
- end if
- end
-
-
-
- on printActivitySpace me, theRect, noTextFlag, noFooterFlag
- if not noTextFlag then
- printCertificate (ancestor)
- else if voidP (noTextFlag) and (the machineType = 256) and not (getLevel (me) mod 2) then
- printActivitySpace (ancestor, theRect, noTextFlag, TRUE)
- else
- printActivitySpace (ancestor, theRect, noTextFlag, FALSE)
- end if
- end